package storage

import (
	"web_framework/model"

	"github.com/jmoiron/sqlx"
)

const (
	RouterDownLoadConfig = "router:downconfig"
)

func GetDownloadConfig(db sqlx.Queryer, id int) (model.DownloadConfig, error) {
	var res model.DownloadConfig
	err := sqlx.Get(db, &res, "select * from router_download_config where id = ?", id)
	if err != nil {
		return res, err
	}
	return res, nil
}
